#ifndef  __DEV_LED188_H__
#define  __DEV_LED188_H__

#include "soc_comm.h"

#define LED188_BITMAP_VIRTUAL_MODE_EN 1
//[不带小数点是7段]
#define LED_SEG_MAX 7

typedef struct Led188Dev_s
{   
    uint16_t p1;
    uint16_t p2;
    uint16_t p3;
    uint16_t p4;
    uint16_t p5;

    uint8_t val;
    
    bool showCharging;
    bool showPercent;
    bool showZero; 

    //
    uint8_t currentScanIndex;

#if LED188_BITMAP_VIRTUAL_MODE_EN > 0
    uint32_t bitVal;
#else 
    uint8_t v1;
    uint8_t v2;
    uint8_t v3;
#endif 
}Led188Dev_t;

void LED188Init(Led188Dev_t *dev);
void LED188CloseAll(Led188Dev_t *dev);
void LED188SetValue(Led188Dev_t *dev, uint8_t val, bool showPercent, bool showCharging);
//定时器中调用
void LED188Update(Led188Dev_t *dev);

void LED188Test(Led188Dev_t *dev, uint32_t ms);

#endif 